import request from '@/utils/request'

export default {
  getList: function (params) {
    return request({
      url: '/supGoods/listByPage',
      method: 'post',
      data: params
    })
  },
  listSupGoodsPage: function (params) {
    return request({
      url: '/supGoods/listSupGoodsPage',
      method: 'post',
      data: params
    })
  },
  addGoods: function(params){
    return request({
      url: '/supGoods/save',
      method: 'post',
      data: params
    })
  },
  addGoodsFile: function(params){
    return request({
      url: '/supGoods/saveFile',
      method: 'post',
      data: params
    })
  },
  getFileByPathToBase64: function(data){
    return request({
      url: '/supGoods/getFileByPathToBase64',
      method: 'post',
      data
    })
  },
  changeStatus: function (id) {
    return request({
      url: '/supGoods/changeStatus/'+id,
      method: 'get'
    })
  },
  remove: function (id) {
    return request({
      url: '/supGoods/delete/'+id,
      method: 'get'
    })
  }
}
